const state = {
  treeRoute: null,
  classServices: null,
  treeData: null,
  renderGrand: null
};

const mutations = {
  updateTreeRouteMutation(state, payload) {
    state.treeRoute = payload;
  },
  updateClassServicesMutation(state, payload) {
    state.classServices = payload;
  },
  updateTreeDataMutation(state, payload) {
    state.treeData = payload;
  },
  updateRenderGrandMutation(state, payload) {
    state.renderGrand = payload;
  }
};

const actions = {
  updateTreeRoute({ state, commit, rootState }, resdata) {
    commit("updateTreeRouteMutation", resdata);
  },
  updateclassServices({ state, commit, rootState }, resdata) {
    commit("updateClassServicesMutation", resdata);
  },
  updateTreeData({ state, commit, rootState }, resdata) {
    commit("updateTreeDataMutation", resdata);
  },
  updateRenderGrand({ commit }, resdata) {
    commit("updateRenderGrandMutation", resdata);
  }
};
export default {
  namespaced: true,
  state,
  mutations,
  actions
};
